package com.mushuilingfeng.ddd.user.domain.user.repository;

import com.mushuilingfeng.ddd.framework.repository.IDomainRepository;
import com.mushuilingfeng.ddd.user.domain.user.entity.UserLoginDevice;

import java.util.Date;
import java.util.List;

/**
 * @author 沐水淋风
 * @date 2024/10/5
 */
public interface IUserLoginDeviceRepository extends IDomainRepository<UserLoginDevice> {
    
    int getLoginDeviceCount(Long userId);
    
    UserLoginDevice getByUserIdAndDeviceCode(Long userId, String deviceCode);
    
    List<UserLoginDevice> listByUserId(Long userId);
    
    void updateLastLoginTime(Long id, Date lastLoginTime);
}
